home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 1 #8 / utv1n8s1.d64 / computer squares (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  13KB  |  380 lines

  1. 10 ifpeek(40704)<>165thenpoke56,127:clr:load"0:draw",8,1
  2. 15 clr:sys 65418:poke 808,234
  3. 20 goto 505
  4. 25 fc=6:syspp
  5. 26 print"[147]   [195]omputer [211]quares plays like the"
  6. 27 print"popular [212].[214]. game show, "chr$(34)"[200][207][204][204][217][215][207][207][196]"
  7. 28 print"[211][209][213][193][210][197][211]"chr$(34)", which is a tic-tac-toe trivia game.
  8. 30 [153]"   (NULL)ine celebrities sit in the tic-tac-"
  9. 32 [153]"toe grid.  (NULL)ou pick the celebrity you"
  10. 34 [153]"want, the host will ask him a question"
  11. 36 [153]"and they will give an answer.  right$t is up"
  12. 38 [153]"to you to decide if the question has"
  13. 40 [153]"been answered truthfully or not.  right$f you";
  14. 42 [153]"are right your mark (either (NULL) or (NULL)) is"
  15. 44 [153]"placed in that square.  right$f you are wrong";
  16. 46 [153]"your opponent will have their mark"
  17. 48 [153]"placed in that square."
  18. 49 [141] 400
  19. 50 [153]"load(NULL)(NULL)valatn(NULL)val (NULL)(NULL)(NULL)val: (NULL)he only time your"
  20. 52 [153]"opponent's mark is not placed in your"
  21. 54 [153]"square is when this would cause him to"
  22. 55 [153]"win the game.  (NULL)his square must be"
  23. 56 [153]"earned by picking it on their turn."
  24. 58 [153]"(NULL)wo rounds are played (three if you are"
  25. 60 [153]"tied).  (NULL)ou win $500 per round and the"
  26. 62 [153]"grand winner gets to try and win a car."
  27. 64 [141] 400
  28. 67 [153]"load      (NULL)(NULL)atn(NULL)right$(NULL)chr$ len(NULL)(NULL)(NULL)(NULL)(NULL)val(NULL) (NULL)(NULL)(NULL)atn(NULL)val(NULL)..."
  29. 69 [153]"   (NULL)imply follow the screen prompts to"
  30. 72 [153]"play.  (NULL)ost prompts require you to press";
  31. 74 [153]"one key; others require you to press"
  32. 76 [153]"the (NULL)val(NULL)(NULL)(NULL)(NULL) key after your selection."
  33. 80 [153]"(NULL)hen you are asked '(NULL)left$atn(NULL) (NULL)(NULL)val(NULL)(NULL)right$(NULL)(NULL)(NULL) (NULL)(NULL)(NULL)"
  34. 82 [153]"(NULL)atn(NULL)(NULL) (NULL)(NULL) (NULL)(NULL)val' press (NULL)val(NULL)(NULL)(NULL)(NULL) for the"
  35. 84 [153]"standard set of questions.  right$f you have"
  36. 86 [153]"created your own question file with
  37. 88 print"'[209][213][197][211][212][201][207][206] [205][193][203][197][210]', then enter that file's";
  38. 89 print"name and press return."
  39. 90 print"   [201]f you are playing a solitaire game"
  40. 92 print"you can choose from among 3 computer"
  41. 94 print"players.  [212]he higher the number, the"
  42. 96 print"smarter the player."
  43. 100 poke198,0:print"[154]        [208]ress [211][208][193][195][197][194][193][210] to start"
  44. 110 gety$:ify$<>" "then110
  45. 115 fc=7:syspp
  46. 120 return
  47. 400 print"[154]      [208]ress [211][208][193][195][197][194][193][210] to continue.";:poke198,0
  48. 410 gety$:ify$<>" "then410
  49. 420 return
  50. 505 s=54272:fort=stos+24:poket,0:next:pokes+24,15
  51. 510 rd=0:pp=40704:pn$="title":la=32768:fc=0:syspp:print"[147]"
  52. 515 fc=1:syspp:fc=2:syspp
  53. 520 pokes+2,255:pokes+3,7:pokes+5,9:pokes+6,0
  54. 525 fory=1to10:pokes+1,18:pokes,104:pokes+4,65:foru=1to100:nextu:pokes+4,64
  55. 530 pokes+1,20:pokes,104:pokes+4,65:foru=1to100:nextu:pokes+4,64
  56. 535 pokes+1,22:pokes,104:pokes+4,65:foru=1to100:nextu:pokes+4,64
  57. 540 pokes+3,y:nexty
  58. 545 forw=830to945:reade:pokew,e:next
  59. 550 data169,2,162,176,160,3,32,189,255,169,1,162,8,160,0,32,186,255,32,192
  60. 555 data255,24,162,1,32,198,255,176,75,32,207,255,32,207,255,169,13,32,210,255
  61. 560 data32,207,255,32,207,255,32,207,255,133,252,32,207,255,133,251,165,144
  62. 565 data208,44,165,251,166,252,32,205,189,169,32,32,210,255,32,207,255,32,210
  63. 570 data255,174,141,2,208,251,166,145,224,127,240,15,32,207,255,105,0,208,235
  64. 575 data169,13,32,210,255,76,102,3,24,169,1,32,195,255,32,204,255,96,36,48
  65. 577 gosub 2500
  66. 578 get a$:if a$="y" then gosub 25:goto581
  67. 579 if a$="[140]" then 2600
  68. 580 if a$<>"n" then 578
  69. 581 poke198,0:print"[147]"tab(11)"[207]ne player or two?"
  70. 582 printtab(13)"([197]nter 1 or 2)"
  71. 585 geta$:ifa$<"1"ora$>"2" and a$<>"[140]" then585
  72. 587 if a$="[140]" then 2600
  73. 590 ifa$="2"then615
  74. 592 a4=val(a$)
  75. 595 poke198,0:printtab(8)"[145][145][193]re you male or female?"
  76. 597 printtab(13)"([197]nter [205] or [198])"
  77. 600 getb3$
  78. 601 if b3$="[140]" then 2600
  79. 603 if b3$<>"m" and b3$<>"f" then 600
  80. 605 se$="screen1":ifb3$="f"thense$="screen3"
  81. 610 goto650
  82. 615 printtab(10)"[145][145][193]re the two players:"
  83. 620 printtab(5)"1-[205]ale & [198]emale  2-[205]ale & [205]ale"
  84. 625 print"  3-[198]emale & [198]emale  ([197]nter 1, 2 or 3)";:poke198,0
  85. 630 geta7$:ifa7$="1"thense$="screen1":goto650
  86. 633 if a7$="[140]" then 2600
  87. 635 ifa7$="2"thense$="screen2":goto650
  88. 640 ifa7$="3"thense$="screen3":goto650
  89. 645 goto630
  90. 650 fort=1to500:next:print"[147]"
  91. 655 pn$=se$:fc=1:syspp:fc=2:syspp:r1=rd:r2=la
  92. 660 pn$="car":fc=1:syspp:rd=r2
  93. 665 dimb(9):dima$(199):dimr(49)
  94. 670 nn=-1
  95. 675 l1$="[147][144]":printl1$"[215]hat is player one's name?"
  96. 676 print">";:gosub2000:n1$=t$
  97. 680 ifa4<>1then715
  98. 685 poke198,0
  99. 690 printl1$tab(8)"[156][215]ho do you want to play?"
  100. 692 printtab(7)"1) [205]ary  2) [208]at  3) [211]hanna[144]
  101. 695 [161]q1$:[139]q1$[178]"1"[167]n2$[178]"(NULL)ary":[137]720
  102. 700 [139]q1$[178]"2"[167]n2$[178]"(NULL)at":[137]720
  103. 705 [139]q1$[178]"3"[167]n2$[178]"(NULL)hanna":[137]720
  104. 706 [139] q1$[178]"restore" [167] 2600
  105. 710 [137]695
  106. 715 [153]l1$"(NULL)hat is player two's name?":[153]">";:[141]2000:n2$[178]t$
  107. 720 [153]l1$"   (NULL)hat questions do you want to use?"
  108. 725 [153]" valnter questions name or (NULL)val(NULL)(NULL)(NULL)(NULL) for
  109. 730 print" regular questions":tt=1:t1=1:t2=2:m1=0:m2=0
  110. 732 print">";:gosub 2000:b$=t$:if b$="" then b$="q"
  111. 735 print"[147]"tab(15)"[200]ang on...":printtab(11)"[199]etting loaded..."
  112. 742 open 15,8,15,"i0"
  113. 745 open3,8,3,"0:"+b$:input#15,er:close3:close15:ifer<20then755
  114. 750 printl1$"[196][201][211][203] [197][210][210][207][210]!!!. [212]ry again.":forxx=1to3000:next:goto720
  115. 755 fc=6:syspp:open3,8,3,"0:"+b$
  116. 760 forb=0to199
  117. 765 input#3,a$(b):next
  118. 770 close3:fc=6:syspp
  119. 775 printl1$tab(7)"[205]ixing up the questions..."
  120. 780 forp=0to49:r(p)=p:next:x=ti:z=ti
  121. 785 op=peek(162):forp=1toop:z=int(rnd(ti)*50):x=int(rnd(ti)*50)
  122. 790 r=r(x):r(x)=r(z):r(z)=r:next
  123. 795 printl1$tab(6)"[207].[203]., player one you start.":tu=1
  124. 800 iftu=1thenprint" "n1$", pick a square for your [216]."
  125. 805 iftu=2anda4=1then1170
  126. 810 iftu=2thenprint" "n2$", pick a square for your [207]."
  127. 815 nn=nn+1:ifnn=49thennn=1
  128. 820 poke198,0
  129. 825 getg$:ifg$<"1"org$>"9"and g$<>"[140]" then825
  130. 827 if g$="[140]" then 2600
  131. 830 g=val(g$)
  132. 835 ifb(g)<>0thenprintl1$tab(5)"[211]orry, that one has been used.":goto800
  133. 840 printl1$tab(7)"[206]umber"g" the question is:"
  134. 845 print" "a$(r(nn)*4):forxx=1to5:gosub1760:next
  135. 850 ifa$(r(nn)*4+3)<>"+"thenprintl1$" "a$(r(nn)*4+3):forx=1to1000:next
  136. 855 ifa$(r(nn)*4+3)<>"+"thenprint" just kidding....[144]":forx=1to1500:next
  137. 860 mn=int(rnd(1)*2):printl1$" [201]'ll say..."a$(r(nn)*4+1+mn)
  138. 865 printtab(4)"[144][215]ell, do you agree, disagree or"
  139. 870 print"  want the question repeated? ([193]/[196]/[210])";:poke198,0
  140. 875 iftu=2anda4=1then1320
  141. 880 gete$
  142. 885 ife$="a"then925
  143. 890 ife$="d"then935
  144. 895 ife$="r"then905
  145. 897 if e$="[140]" then 2600
  146. 900 goto880
  147. 905 printl1$" [212]he question was:":print" "a$(r(nn)*4):forex=1to5:gosub1760:next
  148. 910 forex=1to50:next
  149. 915 printl1$" [212]he answer was: "a$(r(nn)*4+1+mn):forxx=1to5:gosub1760:next
  150. 920 goto865
  151. 925 ifmn=0thengosub1735:goto1030
  152. 930 goto940
  153. 935 ifmn=1thengosub1735:goto1125
  154. 940 gosub1720:printl1$" [211]orry, "a$(r(nn)*4+1):print" is the correct answer."
  155. 945 fory=1to2000:next
  156. 950 b(g)=3:zn=1:iftu=1thenzn=2
  157. 955 k1=zn:k2=zn:k3=3:gosub1625:ifwi=9then1005
  158. 960 k1=zn:k2=3:k3=zn:gosub1625:ifwi=9then1005
  159. 965 k1=3:k2=zn:k3=zn:gosub1625:ifwi=9then1005
  160. 970 iftu=1thenprintl1$tab(11)"[207] gets the square.":b(g)=2:gosub1770:goto980
  161. 975 printl1$tab(11)"[216] gets the square.":b(g)=1:gosub1780
  162. 980 fore=1to1500:next
  163. 985 gosub1060:pr$="x":iftu=1thenpr$="o"
  164. 990 fc=4:syspp:fc=5:syspp:fore=1to3000:next
  165. 995 gosub1670:ifwi=8orwi=7thengosub1370:goto1435
  166. 1000 goto1155
  167. 1005 iftu=1thenprintl1$tab(10)"[195]an't put an [207] there":printn2$
  168. 1010 iftu=1thenprinttab(4)"[217]ou'll have to earn that square":goto1025
  169. 1015 printl1$tab(10)"[195]an't put an [216] there":printtab(20-len(n1$)/2)n1$
  170. 1020 printtab(4)"[217]ou'll have to earn that square."
  171. 1025 forxx=1to3000:next:b(g)=0:go